<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="__BOOTSTRAP__/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__BOOTSTRAP__/css/bootstrap-theme.min.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/msg.css"/>


    <script type="text/javascript" src="__JS__/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__BOOTSTRAP__/js/bootstrap.min.js"></script>

    <script type="javascript">
        $('#myTab a').click(function (e) {
            e.preventDefault()
            $(this).tab('show')
        })
    </script>
</head>
<body>

<div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs" id="table">
    <ul id="myTab" class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#home" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">用户组列表</a></li>
    </ul>
    <div id="myTabContent" class="tab-content home">
        <div role="tabpanel" class="tab-pane fade in active" id="home" aria-labelledBy="home-tab">
            <table class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>组名称</th>
                    <th>状态</th>
                    <th>权限</th>
                    <th>操作</th>
                </tr>
                </thead>
                <foreach  name="groups" item="v">
                    <tbody>
                    <tr>
                        <td>{$v.id}</td>
                        <td>{$v.title}</td>
                        <td>
                            <if condition="($v['status'] eq 1)">
                                正常的
                            <else />
                                禁用的
                            </if>
                        </td>
                        <td>{$v.rules}</td>
                        <td>
                            <a class="btn btn-primary btnclick" href="{:U('Group/edit',array('id'=>$v['id']))}" role="button">编辑</a>
                            <a class="btn btn-primary btnclick" href="{:U('Group/addAuth',array('id'=>$v['id']))}" role="button">权限</a>
                        </td>
                    </tr>
                    </tbody>
                </foreach>
            </table>

            <div class="row bottom">
                <div class="col-md-6" style="text-align:left">
                </div>
                <div class="col-md-6" style="text-align:right">{$page}</div>
            </div>

        </div>

    </div>
</div>

</body>
</html>